package controllers;

import java.util.List;

import models.Standard;
import services.HraDetailService;
import services.HraStandardService;
import utils.BizConstants;
import vos.HraDetailSearchVo;
import vos.HraDetailView;
import vos.HraStandardSearchVo;
import vos.ReturnListVo;

public class HraStandardController extends BaseController  {
	/**
	 * 跳转体检项标准值页面
	 *
	 * @Title: standard 
	 * @return: void
	 */
	public static void standard(){
		render();
	}
	/**
	 * 获取列表数据
	 *
	 * @Title: getdetail 
	 * @param page 页
	 * @param rows 页大小
	 * @param itemcode 编码
	 * @param itemname 名称
	 * @return: void
	 */
	public static void getstandard(int page,int rows,String sort,String order,String itemcode,String itemname){
		if(page==0){
			page=1;
		}
		if(rows==0){
			rows=BizConstants.pagesize;
		}
		HraStandardSearchVo vo =new HraStandardSearchVo(page,rows,order,sort,itemcode,itemname);
		long total=HraStandardService.countdetail(vo);
		ReturnListVo listVo=new ReturnListVo();
		listVo.setTotal(total);
		List<Standard> lists=HraStandardService.listHraDetail(vo);
		listVo.setRows(lists);
		renderJSON(listVo);
	}
}
